﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.ZY
{
    /// <summary>
    /// 生命附加福祥重大疾病保险
    /// </summary>
    class Class6
    {
        /// <summary>
        /// 重大疾病保险金给付
        /// </summary>
        /// <param name="ppa"></param>
        /// <param name="da"></param>
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.InsurantStates.Contains("重疾"))
            {
                if (ppa.Age <= 65)
                {
                    da.Value = ppa.Amount * 5;
                    ppa.IsCurrentFinish = true;
                }
                else
                {
                    da.Value = ppa.Amount * 2;
                    ppa.IsCurrentFinish = true;
                }
            }
        }
        /// <summary>
        /// 身故保险金给付
        /// </summary>
        /// <param name="ppa"></param>
        /// <param name="da"></param>
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                da.Value = ppa.TotalFee;
                ppa.IsCurrentFinish = true;
            }
        }

    }
}
